package com.nc.cloud.admin.biz;

import com.nc.cloud.admin.mapper.RoleMenuMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.nc.cloud.admin.entity.Role;
import com.nc.cloud.admin.mapper.RoleMapper;
import com.nc.cloud.common.biz.BaseBiz;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;

/**
 * 
 *
 * @author XYP
 * @email 23484376@qq.com
 * @date 2020-03-20 09:33:52
 */
@Service
public class RoleBiz extends BaseBiz<RoleMapper,Role> {

    @Autowired
    RoleMapper roleMapper;

    @Autowired
    RoleMenuBiz roleMenuBiz;

    @Transactional
    public void insertFullMsg(Role role, List<HashMap<String,Object>> roleMenu){

        roleMapper.insert(role);

        roleMenuBiz.insertList(roleMenu);
    }


}